<admintpl file="header" />

<link href="__TMPL__Public/assets/css/infomation.css" rel="stylesheet" />
<link type="text/css" href="__PUBLIC__/js/select2/select2.min.css" rel="stylesheet" />
</head>
<body>
    <div class="wrap">
        <ul class="nav nav-tabs">
            <li><a href="{:U('WorkingMemo/index')}">工作便函管理</a></li>
            <if condition="($level eq '0' OR $level eq '1')">
            	<li><a href="{:U('WorkingMemo/add')}">新增工作便函</a></li>
            </if>
            <li class="active"><a href="{:U('WorkingMemo/view', array('id'=>I('request.id/s','')))}">查看工作便函</a></li>
        </ul>
        <section class="tab-pane active fade in" id="access">
            <div class="row">
                <div class="col-xs-12 col-md-12 col-lg-12">
                    <div class="panel panel-info">
                        <div class="panel-body">
                            <form class="form-horizontal form-inline tg" action="" method="post">
                                <div class="row tg-header">
                                    <div class="col-md-12 text-center">
                                        <p style="font-size:32px; line-height:35px; color:red; padding:20px;">杭州市中医院丁桥分院工作便函</p>
                                        <hr/>
                                    </div>
                                    <div class="col-md-12 text-center">
                                        <p class="text-center "><span>市中丁桥便函<input type="text" class="input-xt" name="code" value="{$result.code}"/>号:</span></p>
                                    </div>
                                    <div class="col-md-12 text-center gzbh-title" style="margin:50px auto;">
                                        <p>
                                            <input type="text" style="width: 85%" class="input-xt input-deptname" name="title"  value="{$result.title}"/>
                                        </p>
                                    </div>
                                    <div class="well clearfix">
                                        <p class="tg-to">
                                            <label>发送：</label>
                                            <select name="add_department" disabled style="width:60%; background-color:white;  height:30px; border: 1px solid #aaa; border-radius:4px; cursor:text;" data-placeholder="选择发送单位:">
                                                <foreach name="data" item="vo">
                                                    <option <if condition="$vo.id eq $selectDefault">selected="selected"</if> value="{$vo.id}">{$vo.department_name}</option>
                                                </foreach>
                                            </select>
                                        </p>
                                        <textarea name="content" style="height: 200px;width: 95%" >{$result.content}</textarea>
                                        <div class="text-right" style="margin-top:50px;">
                                            <p style="margin-right: 70px;">杭州市中医院丁桥分院</p>
                                        </div>

                                        <p>
                                            <label>抄送:</label>
                                            <select name="carbon_copy_department" id="carbon_copy_department" style="width:60%;" read class="select2" multiple="multiple" data-placeholder="选择抄送单位">
                                                <foreach name="data" item="vo">
                                                    <option value="{$vo.id}">{$vo.department_name}</option>
                                                </foreach>
                                            </select>
                                        </p>

                                        <if condition="$results">
                                            <div style="padding:10px 0px;">
                                                <label>附件:</label>
                                                <foreach name="results" item="vo">
                                                    <div class='controls' style='margin-top:10px;margin-left:20px'>
                                                        <a class="fileDownload" path="{$vo.file_path}" name="{$vo.file_name}" data-type="{$vo.file_type}">{$vo.file_name}</a>
                                                    </div>
                                                </foreach>
                                            </div>
                                        </if>


                                    </div>
                                </div>
                                <div class="form-actions">
                                    <a class="btn btn-default" href="{:U('WorkingMemo/index')}">{:L('BACK')}</a>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>
    <script src="__PUBLIC__/js/jquery.js"></script>
    <script src="__PUBLIC__/js/common.js"></script>
    <script src="__PUBLIC__/js/select2/select2.min.js"></script>
    <script src="__PUBLIC__/js/select2/i18n/zh-cn.js"></script>
    <script src="__PUBLIC__/js/select2/select2.default.js"></script>
    <script type="text/javascript">
        $("input").attr("readonly", true);
        $("#carbon_copy_department").select2().val({$dept2}).trigger('change');
        $(".select2").prop("disabled", true);
    </script>
</body>
</html>